<html>  
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  </head>
  <% 
      table_style = 'width:500px;background-color:#DFDFDF;margin-left:10px;line-height:16px;'
      th_style = 'background-color:#F6F6F4;font-size:12px;color:#666666;text-align:center;'
      td_style = 'background-color:white;font-size:12px;color:DFDFDF;padding-left:5px;padding-right:5px;line-height:18px;color:#666666;'
      img_style = 'margin-left:4px;margin-right:4px;'
   %> 
  <body style='color:#404040;'>
    <h5>亲爱的<%= link_to @setting.user.nick_name,
                    user_url(@setting.user,:host => 'www.mytusi.com'), 
                    :target => :_blank, 
                    :style => 'color:#197325;text-decoration:underline;' %>： </h5>
    <p>
    <table cellspacing="1" cellpadding="1" style='<%= table_style %>'  >
      <tr>
        <th style='<%= th_style %>'>日期</th>
        <th style='<%= th_style %>'>天气现象</th>
        <th style='<%= th_style %>'>气温</th>
        <th style='<%= th_style %>'>风向</th>
      </tr>
      <% 6.times do |i| %>
      <tr>
        <td style='<%= td_style %>'>
          <%= Time.now.since(i.days).day %>日<%= t('date.day_names', :locale => :'zh-CN')[Date.today.since(i.days).wday] %>
        </td>
        <td style='<%= td_style %>'>
          <%= @setting.area.weather_info["weather#{i + 1}"] %>       
        </td>
        <td style='<%= td_style %>'>
           <%= @setting.area.weather_info["temp#{i + 1}"] %>      
        </td>
        <td style='<%= td_style %>'>
          <%= @setting.area.weather_info["wind#{i + 1}"] %>         
        </td>
      </tr>
      <% end %>
    </table>
    </p>
    <p>如果您觉得该邮件发送过于频繁，请您及时<%= link_to "登录到麦吐司网", "http://www.mytusi.com/users/current?user_id=#{@setting.user.id}&authorized_code=#{@setting.user.authorized_code}",:target => '_blank',:style => 'color:#197325;text-decoration:underline;' %>进行设置。如果您还有任何的疑问, 请与网站管理员联络: <%= link_to "amon.lei@gmail.com", "mailto:amon.lei@gmail.com",:style => 'color:#197325;text-decoration:underline;' %></p>
    <p>欢迎您再次光临麦吐司网<%= link_to 'www.mytusi.com', 'www.mytusi.com', :target => :_blank, :style => 'color:#197325;text-decoration:underline;'%>!</p>
  </body>
</html> 